<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>EasyTalk Administrator's Control Panel</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta content="H.Joeson" name="Copyright" />
		<link rel="stylesheet" href="<{$res}>/css/style.css" type="text/css" media="all" />
		<script src="<{$res}>/js/jquery.js" type="text/javascript"></script>
		<script src="<{$res}>/js/admin.js" type="text/javascript"></script>
		<script type="text/javascript" charset="utf-8">
			var __URL__ = "<{$url}>";
		</script>
	</head>
	<body>
		<div id="bodymain">
			<div class="title"> </div>
			<div class="content">
				<h3>词语过滤</h3>
				<div class="infomation">
					<b>说明：</b>为不影响程序效率，请不要设置过多不需要的过滤内容。该过滤词语仅对发表广播有效。
				</div>
					<table class="table" style="margin:5px 0 20px 0">
						<tr>
							<td width="90px">&nbsp;</td>
							<td width="250px"><b>不良词语</b></td>
							<td><b>过滤动作</b></td>
						</tr>
						<{foreach $result as $list}>
						<tr>
							<td><input type="checkbox" name="delid[]" value="<{$list['id']}>" class="checkbox"></td>
							<td><input type="text" name="wordname[]" value="<{$list['filter']}>" class="txt_input" style="width:120px"></td>
							<td>禁止发表</td>
						</tr>
						<{/foreach}>

					<form action='<{$url}>/wordinsert' method="POST">
						<tr>
							<td>&nbsp;</td>
							<td><input type="text" name="wordname[]" value="" class="txt_input" style="width:120px"></td>
							<td>禁止发表</td>
						</tr>
						<tr id="addbtn">
							<td>&nbsp;</td>
							<td colspan="3"><a href="javascript:void(0)" onclick="addword()">+ 添加</a></td>
						</tr>
						<tr>
							<td><input type="checkbox" onclick="CheckAll('delid', 'chkall')" id="chkall" name="chkall" class="checkbox"> <a href="javascript:void(0)" onclick="delword(<{$list['id']}>);">删除</a> </td>
							<td colspan="3"><input type="submit" class="button1" value="提交保存"></td>
						</tr>
					</form>
				</table>
				<script type="text/javascript">
					function addword() {
						$('#addbtn').before('<tr><td>&nbsp;</td><td><input type="text" name="wordname[]" value="" class="txt_input" style="width:120px"></td><td>禁止发表</td></tr>');
					}
					//删除操作
					function delword(id){
						//alert(id);
						$.ajax({
							type:"POST",
							url:__URL__+"/delword",
							data:"id="+id,
							success:function(data){
								alert("删除成功");
							}
						});
					}
				</script>
			</div>
		</div>
	</body>
</html>
